

function toOpenFile(){
    $("input[name='imagefile']").trigger("click");
}
/**
 * 通过 Ajax 上传图片
 */
function uploadImage() {
    let formData = new FormData();
    formData.append("file", $("#imagefile")[0].files[0]);
    $.ajax({
        url: "/upload/image",
        type: "POST",
        data: formData,
        contentType: false,
        processData: false,
        success: function (res) {
            console.log("ajax 上传图片返回的结果是：", res);
            $("#storeIcon").val(res.url);
            $("#imgStoreIcon").attr("src", res.url);
        }
    });
}